package com.leyou.dao;

import com.leyou.pojo.Category;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface CategoryMapper  extends Mapper<Category> {
    
    public Category findCate(int id);
    //根据cid1.cid2.cid3查询他们的名字
     @Select("select name from tb_category where id=#{cid1} or id=#{cid2} or id=#{cid3}")
    List<String> selectByIds(Integer cid1, Integer cid2, Integer cid3);
    @Select("select * from tb_category where id=#{cid}")
    Category findCategoryById(Integer cid);
    @Select("select * from tb_category where id=#{cid1} or id=#{cid2} or id=#{cid3}")
    List<Category> findCategoryByCids(Integer cid1, Integer cid2, Integer cid3);
}
